package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by fuyi on 2017/10/7.
 */

public class GiveThumbs_upApi extends BaseApi {
    GiveThumbs_upReq req;


    public GiveThumbs_upApi(String video_id ,String member_id) {
        req = new GiveThumbs_upReq(video_id,member_id);
    }


    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getGiveThumbs_up(requestBody);
    }

    private class GiveThumbs_upReq {
        public String video_id;
        public String member_id;

        public GiveThumbs_upReq(String video_id,String member_id) {
            super();
            this.video_id = video_id;
            this.member_id = member_id;
        }
    }
}
